package com.vhans.db.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vhans.core.domain.BAppointment;
import com.vhans.db.model.dto.ConditionDTO;
import com.vhans.db.model.vo.agreement.*;
import com.vhans.db.model.vo.agreement.appointment.AppointmentAgreementVO;
import com.vhans.db.model.vo.agreement.appointment.AppointmentInfoVO;
import com.vhans.db.model.vo.agreement.appointment.AppointmentVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 【约会】Mapper接口
 *
 * @author vhans
 * @date 2023-04-10
 */
@Repository
public interface BAppointmentMapper extends BaseMapper<BAppointment> {
    /**
     * 查询约会列表
     *
     * @param condition 条件
     * @return 约会列表
     */
    List<AppointmentVO> selectAppointmentVO(@Param("condition") ConditionDTO condition);

    /**
     * 根据id查询约会信息
     *
     * @param appointmentId 约会id
     * @return 约会信息
     */
    AppointmentInfoVO selectAppointmentInfoById(@Param("appointmentId") Integer appointmentId);

    /**
     * 查看首页约会列表
     *
     * @return 首页约会列表
     */
    List<AgreementHomeListVO> listAppointmentHomeVO();

    /**
     * 根据id查询约起中心约会
     *
     * @param appointmentId 约会id
     * @return 约起中心约会
     */
    AppointmentAgreementVO selectAppointmentAgreementById(Integer appointmentId);

    /**
     * 根据id查询约起中心指定约会
     *
     * @param appointmentId 约会id
     * @return 约起中心指定约会
     */
    AppointmentAgreementVO selectSpecifyAppointmentAgreementById(Integer appointmentId);

    /**
     * 查询上一篇约会
     *
     * @param appointmentId 约会id
     * @return 上一篇约会
     */
    AgreementPaginationVO selectLastAppointment(Integer appointmentId);

    /**
     * 查询下一篇约会
     *
     * @param appointmentId 约会id
     * @return 下一篇约会
     */
    AgreementPaginationVO selectNextAppointment(Integer appointmentId);

    /**
     * 查询过期的约会
     */
    List<Integer> selectAppointmentExpire();
}
